﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SPMS.Commons.Logging
{
    /// <summary>
    /// 通用日志接口
    /// </summary>
    /// <remarks></remarks>
    /// <history>
    /// [zanezeng]   9/4/2008 4:51 PM    Created
    /// </history>
    public interface ILog
    {
        #region ---Property

        /// <summary>
        /// 根据当前日志级别设定判断是否允许输出调试级别日志信息
        /// </summary>
        /// <value>
        /// 	<c>true</c>允许<br/>
        /// 	<c>false</c>不允许
        /// </value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:23 AM    Created
        /// </history>
        bool IsDebugEnabled
        {
            get;
        }

        /// <summary>
        /// 根据当前日志级别设定判断是否允许输出跟踪级别日志信息
        /// </summary>
        /// <value>
        /// 	<c>true</c>允许<br/>
        /// 	<c>false</c>不允许
        /// </value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:19 AM    Created
        /// </history>
        bool IsTraceEnabled
        {
            get;
        }

        /// <summary>
        /// 根据当前日志级别设定判断是否允许输出提示级别日志信息
        /// </summary>
        /// <value>
        /// 	<c>true</c>允许<br/>
        /// 	<c>false</c>不允许
        /// </value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:24 AM    Created
        /// </history>
        bool IsInfoEnabled
        {
            get;
        }

        /// <summary>
        /// 根据当前日志级别设定判断是否允许输出警告级别日志信息
        /// </summary>
        /// <value>
        /// 	<c>true</c>允许<br/>
        /// 	<c>false</c>不允许
        /// </value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:25 AM    Created
        /// </history>
        bool IsWarnEnabled
        {
            get;
        }

        /// <summary>
        /// 根据当前日志级别设定判断是否允许输出错误级别日志信息
        /// </summary>
        /// <value>
        /// 	<c>true</c>允许<br/>
        /// 	<c>false</c>不允许
        /// </value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:25 AM    Created
        /// </history>
        bool IsErrorEnabled
        {
            get;
        }

        /// <summary>
        /// 根据当前日志级别设定判断是否允许输出灾难级别日志信息
        /// </summary>
        /// <value>
        /// 	<c>true</c>允许<br/>
        /// 	<c>false</c>不允许
        /// </value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:25 AM    Created
        /// </history>
        bool IsFatalEnabled
        {
            get;
        }

        #endregion

        #region ---Method

        /// <summary>
        /// 判断当前日志记录器是否允许输出给定日志级别的日志
        /// </summary>
        /// <param name="level">用于判定的日志级别</param>
        /// <returns>
        /// 	<c>true</c>：允许输出<br/>
        /// 	<c>false</c>：不允许输出
        /// </returns>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]               2009/9/24 13:30    创建
        /// </history>
        bool IsLevelEanbled( LogLevelEnum level );

        /// <summary>
        /// 输出日志信息
        /// </summary>
        /// <param name="level">要输出的日志信息的级别</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void WriteLog( LogLevelEnum level, object message );

        /// <summary>
        /// 输出日志信息
        /// </summary>
        /// <param name="level">要输出的日志信息的级别</param>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void WriteLog( LogLevelEnum level, Exception ex, object message );

        /// <summary>
        /// 输出日志信息
        /// </summary>
        /// <param name="level">要输出的日志信息的级别</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void WriteLog( LogLevelEnum level, string message, params object[] args );

        /// <summary>
        /// 输出日志信息
        /// </summary>
        /// <param name="level">要输出的日志信息的级别</param>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void WriteLog( LogLevelEnum level, Exception ex, string message, params object[] args );

        /// <summary>
        /// 输出日志信息
        /// </summary>
        /// <param name="level">要输出的日志信息的级别</param>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void WriteLog( LogLevelEnum level, IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出日志信息
        /// </summary>
        /// <param name="level">要输出的日志信息的级别</param>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void WriteLog( LogLevelEnum level, Exception ex, IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出调试信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Debug( object message );

        /// <summary>
        /// 输出调试信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Debug( Exception ex, object message );

        /// <summary>
        /// 输出调试信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Debug( string message, params object[] args );

        /// <summary>
        /// 输出调试信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Debug( Exception ex, string message, params object[] args );

        /// <summary>
        /// 输出调试信息
        /// </summary>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Debug( IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出调试信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Debug( Exception ex, IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出跟踪信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Trace( object message );

        /// <summary>
        /// 输出跟踪信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Trace( Exception ex, object message );

        /// <summary>
        /// 输出跟踪信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Trace( string message, params object[] args );

        /// <summary>
        /// 输出跟踪信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Trace( Exception ex, string message, params object[] args );

        /// <summary>
        /// 输出跟踪信息
        /// </summary>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Trace( IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出跟踪信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Trace( Exception ex, IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出提示信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Info( object message );

        /// <summary>
        /// 输出提示信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Info( Exception ex, object message );

        /// <summary>
        /// 输出提示信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Info( string message, params object[] args );

        /// <summary>
        /// 输出提示信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Info( Exception ex, string message, params object[] args );

        /// <summary>
        /// 输出提示信息
        /// </summary>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Info( IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出提示信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Info( Exception ex, IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出警告信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Warn( object message );

        /// <summary>
        /// 输出警告信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Warn( Exception ex, object message );

        /// <summary>
        /// 输出警告信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Warn( string message, params object[] args );

        /// <summary>
        /// 输出警告信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Warn( Exception ex, string message, params object[] args );

        /// <summary>
        /// 输出警告信息
        /// </summary>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Warn( IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出警告信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Warn( Exception ex, IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出错误信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Error( object message );

        /// <summary>
        /// 输出错误信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Error( Exception ex, object message );

        /// <summary>
        /// 输出错误信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Error( string message, params object[] args );

        /// <summary>
        /// 输出错误信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Error( Exception ex, string message, params object[] args );

        /// <summary>
        /// 输出错误信息
        /// </summary>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Error( IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出错误信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Error( Exception ex, IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出灾难信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Fatal( object message );

        /// <summary>
        /// 输出灾难信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Fatal( Exception ex, object message );

        /// <summary>
        /// 输出灾难信息
        /// </summary>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Fatal( string message, params object[] args );

        /// <summary>
        /// 输出灾难信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Fatal( Exception ex, string message, params object[] args );

        /// <summary>
        /// 输出灾难信息
        /// </summary>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Fatal( IFormatProvider provider, string message, params object[] args );

        /// <summary>
        /// 输出灾难信息
        /// </summary>
        /// <param name="ex">需要输出到日志的异常对象</param>
        /// <param name="provider">用于消息格式化的格式化提供者</param>
        /// <param name="message">需要输出到日志的信息</param>
        /// <param name="args">输出信息的格式化参数</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   9/6/2008 9:30 AM    Created
        /// </history>
        void Fatal( Exception ex, IFormatProvider provider, string message, params object[] args );

        #endregion
    }
}